﻿namespace ChessToys
{
    /// <summary>
    /// The pawn.
    /// </summary>
    public class Pawn : AbstractPiece
    {
        /// <summary>
        /// Direction where the pawn goes to.
        /// </summary>
        public enum Direction
        {
            /// <summary>
            /// The pawn go up.
            /// </summary>
            Up,
            
            /// <summary>
            /// The pawn go down.
            /// </summary>
            Down
        }

        private Direction _direction;

        /// <summary>
        /// Initializes a new instance of the <see cref="Pawn"/>.
        /// </summary>
        /// <param name="color">The color.</param>
        /// <param name="direction">The direction.</param>
        public Pawn(Color color, Direction direction)
            : base(color)
        {
            _direction = direction;
        }

        /// <summary>
        /// Gets the play direction.
        /// </summary>
        /// <value>The play direction.</value>
        public Direction PlayDirection
        {
            get { return _direction; }
        }

        /// <inheritdoc />
        public override string Name
        {
            get { return "Pawn"; }
        }

        /// <inheritdoc />
        protected override string SpecificSign
        {
            get { return "p"; }
        }
    }
}
